home *** CD-ROM | disk | FTP | other *** search
- Path: hearst.acc.Virginia.EDU!adastra!mbs
- Newsgroups: comp.sys.amiga.programmer
- From: mbs@adastra.cvl.va.us (Michael B. Smith)
- Subject: Re: AS225 daemon launch?
- References: <19960106.7CB5338.12AAC@sdcc8.ucsd.edu>
- X-NewsReader: GRn 3.0b24 December 30, 1995
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- Message-ID: <mbs.46wn@adastra.cvl.va.us>
- Date: Mon, 8 Jan 96 08:35:48 EDT
- Organization: Only if you insist...
-
- In article <19960106.7CB5338.12AAC@sdcc8.ucsd.edu> jfriesne@sdcc8.ucsd.edu (Jeremy Friesner) writes:
- > How can a server program know, for sure, that it was launched by the AS225
- > inetd daemon, vs. being launched from a CLI? The command-line-arguments
- > that inetd provides give a hint, but they could be faked, etc.
-
- socket.library makes 3 validation checks on the socket pointer
- before allowing s_inherit() to succeed. It's not infallible, but
- it's very unlikely that you'll be able to pick a correct value
- to "fool" s_inherit().
-
- If your question is more along the line of "how does a program
- know that it's being called from inetd, and not another program
- that is pretending to be inetd"; well, it doesn't.
- --
- // Michael B. Smith
- \X/ mbs@adastra.cvl.va.us
-